<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui">

<p:dialog header="上传返现" widgetVar="rebateDialog" modal="true" closable="true" resizable="true" width="1200" height="600">
    <style>
        .ui-fileupload-files{
            display: inline-block;
        }
    </style>

    <p:outputPanel id="rebate-dialog">
        <div class="clearfix"
             style="background: -webkit-linear-gradient(top,#f6f7f9 0,#ebedf0 100%); margin-bottom: 10px">
            <p:toolbar>
                <f:facet name="right">
                    <p:commandButton value="导入" icon="fa fa-upload"
                                     onstart="PF('doing').show()"
                                     actionListener="#{loanNewCreditCardOrderListBean.onImport}" oncomplete="PF('doing').hide()"/>
                </f:facet>
            </p:toolbar>
        </div>
        <p:fileUpload fileUploadListener="#{loanNewCreditCardOrderListBean.handleImportRebate}" mode="advanced"
                      dragDropSupport="false"
                      sizeLimit="#{constants:get('UPLOAD_FILE_SIZE')}" fileLimit="1"
                      allowTypes="/(\.|\/)(xls|xlsx)$/" cancelLabel="取消" uploadLabel="上传" label="选择" style="margin-bottom: 10px"/>

        <p:dataTable id="rebateDataTable"
                     style="width: 100%;text-align:center"
                     var="record"
                     value="#{loanNewCreditCardOrderListBean.rebateList}"
                     rows="#{constants:get('ROWS')}"
                     paginator="true"
                     paginatorTemplate="#{constants:get('PAGINATOR_TEMPLATE')}"
                     rowsPerPageTemplate="#{constants:get('ROWS_PER_PAGE_TEMPLATE')}"
                     emptyMessage="#{constants:get('EMPTY_MESSAGE')}"
                     scrollable="true"
                     scrollWidth="100%"
                     reflow="true"
                     selection=""
                     resizableColumns="true">
            <p:column headerText="卡ID" style="text-align:center;">
                <h:outputText value="#{record.cardId}"/>
            </p:column>
            <p:column headerText="手机号" style="text-align:center;">
                <h:outputText value="#{record.mobnum}"/>
            </p:column>
            <p:column headerText="申请人" style="text-align:center;">
                <h:outputText value="#{record.username}"/>
            </p:column>
        </p:dataTable>
    </p:outputPanel>
</p:dialog>

</html>
